package com.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;

import com.dao.UserInfoMapper;
import com.model.UserInfo;
import com.service.UserInfoService;

@Service
public class UserInfoServiceImpl implements UserInfoService {
	
	@Resource
	private UserInfoMapper um;

	public UserInfoMapper getUm() {
		return um;
	}

	public void setUm(UserInfoMapper um) {
		this.um = um;
	}

	public List<UserInfo> listAll() {
		return um.listAll();
	}

	public int saveUserInfo(UserInfo us) {
		return 0;
	}

	public int removeUserInfo(UserInfo us) {
		return 0;
	}

	public int updateUserInfo(UserInfo us) {
		return 0;
	}
	
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"spring.xml","spring-mvc.xml","spring-mybatis.xml"});
		UserInfoService us = ctx.getBean("userInfoServiceImpl", UserInfoService.class);
		System.out.println(us.listAll());
	}
	
}
